package news;

import java.util.List;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

public class Rss_read {

	private String rsur;
	
	public Rss_read(String rsur1){
		this.rsur=rsur1;
	}
	
	public List<Rss_item> getItems() throws Exception{
		SAXParserFactory spf=SAXParserFactory.newInstance();
		SAXParser sa=spf.newSAXParser();
		Rss_handle rh=new Rss_handle();
		sa.parse(rsur, rh);
		return rh.getItems();
	}
}
